package com.ck.core.constant;

import java.util.ArrayList;
import java.util.List;

/**
 * 文件信息常量类
 * @author dxy
 * @date 2018/9/13 14:36
 */
public class FileConstant {
	/**
	 * 地址
	 */
	public static final String URL = "url";
	/**
	 * md5
	 */
	public static final String MD5 = "md5";
	/**
	 * 文件
	 */
	public static final String FILE = "file";
	/**
	 * 大小
	 */
	public static final String SIZE = "size";
	/**
	 * 文件名称
	 */
	public static final String FILE_NAME = "fileName";
	/**
	 * 文件后缀
	 */
	public static final String FILE_SUFFIX = "fileSuffix";
	/**
	 * 文件类型
	 */
	public static final String FILE_TYPE = "fileType";
	/**
	 * 时长
	 */
	public static final String DURATION = "duration";
	/**
	 * 文件类型-文档
	 */
	public static final int FILE_TYPE_DOCUMENT = 1;
	/**
	 * 文件类型-音频
	 */
	public static final int FILE_TYPE_AUDIO = 2;
	/**
	 * 文件类型-html
	 */
	public static final int FILE_TYPE_HTML = 3;
	/**
	 * 视频后缀列表(内容来自：https://en.wikipedia.org/wiki/Video_file_format)
	 */
	protected static final List<String> VIDEO_SUFFIX_LIST = new ArrayList<>();
	static{
		VIDEO_SUFFIX_LIST.add("webm");
		VIDEO_SUFFIX_LIST.add("mkv");
		VIDEO_SUFFIX_LIST.add("flv");
		VIDEO_SUFFIX_LIST.add("vob");
		VIDEO_SUFFIX_LIST.add("ogv");
		VIDEO_SUFFIX_LIST.add("ogg");
		VIDEO_SUFFIX_LIST.add("drc");
		VIDEO_SUFFIX_LIST.add("gif");
		VIDEO_SUFFIX_LIST.add("gifv");
		VIDEO_SUFFIX_LIST.add("mng");
		VIDEO_SUFFIX_LIST.add("avi");
		VIDEO_SUFFIX_LIST.add("mts");
		VIDEO_SUFFIX_LIST.add("m2ts");
		VIDEO_SUFFIX_LIST.add("mov");
		VIDEO_SUFFIX_LIST.add("qt");
		VIDEO_SUFFIX_LIST.add("wmv");
		VIDEO_SUFFIX_LIST.add("yuv");
		VIDEO_SUFFIX_LIST.add("rm");
		VIDEO_SUFFIX_LIST.add("rmvb");
		VIDEO_SUFFIX_LIST.add("asf");
		VIDEO_SUFFIX_LIST.add("amv");
		VIDEO_SUFFIX_LIST.add("mp4");
		VIDEO_SUFFIX_LIST.add("m4p");
		VIDEO_SUFFIX_LIST.add("m4v");
		VIDEO_SUFFIX_LIST.add("mpg");
		VIDEO_SUFFIX_LIST.add("mpeg");
		VIDEO_SUFFIX_LIST.add("svi");
		VIDEO_SUFFIX_LIST.add("3gp");
		VIDEO_SUFFIX_LIST.add("3g2");
		VIDEO_SUFFIX_LIST.add("mxf");
		VIDEO_SUFFIX_LIST.add("flv");
	}

	/**
	 * 音频后缀列表(内容来之：https://en.wikipedia.org/wiki/Audio_file_format)
	 */
	protected static final List<String> AUDIO_SUFFIX_LIST = new ArrayList<>();
	static{
		AUDIO_SUFFIX_LIST.add("mp3");
		AUDIO_SUFFIX_LIST.add("3gp");
		AUDIO_SUFFIX_LIST.add("aa");
		AUDIO_SUFFIX_LIST.add("aac");
		AUDIO_SUFFIX_LIST.add("aax");
		AUDIO_SUFFIX_LIST.add("act");
		AUDIO_SUFFIX_LIST.add("aiff");
		AUDIO_SUFFIX_LIST.add("amr");
		AUDIO_SUFFIX_LIST.add("ape");
		AUDIO_SUFFIX_LIST.add("au");
		AUDIO_SUFFIX_LIST.add("awb");
		AUDIO_SUFFIX_LIST.add("dct");
		AUDIO_SUFFIX_LIST.add("dss");
		AUDIO_SUFFIX_LIST.add("dvf");
		AUDIO_SUFFIX_LIST.add("flac");
		AUDIO_SUFFIX_LIST.add("gsm");
		AUDIO_SUFFIX_LIST.add("iklax");
		AUDIO_SUFFIX_LIST.add("ivs");
		AUDIO_SUFFIX_LIST.add("m4a");
		AUDIO_SUFFIX_LIST.add("m4b");
		AUDIO_SUFFIX_LIST.add("m4p");
		AUDIO_SUFFIX_LIST.add("mpc");
		AUDIO_SUFFIX_LIST.add("msv");
		AUDIO_SUFFIX_LIST.add("nsf");
		AUDIO_SUFFIX_LIST.add("ogg");
		AUDIO_SUFFIX_LIST.add("oga");
		AUDIO_SUFFIX_LIST.add("mogg");
		AUDIO_SUFFIX_LIST.add("opus");
		AUDIO_SUFFIX_LIST.add("ra");
		AUDIO_SUFFIX_LIST.add("rm");
		AUDIO_SUFFIX_LIST.add("sln");
		AUDIO_SUFFIX_LIST.add("tta");
		AUDIO_SUFFIX_LIST.add("vox");
		AUDIO_SUFFIX_LIST.add("wav");
		AUDIO_SUFFIX_LIST.add("wma");
		AUDIO_SUFFIX_LIST.add("wv");
		AUDIO_SUFFIX_LIST.add("webm");
		AUDIO_SUFFIX_LIST.add("8svx");
	}

	/**
	 * 图片后缀列表(内容来之：https://en.wikipedia.org/wiki/Image_file_formats)
	 */
	protected static final List<String> IMAGE_SUFFIX_LIST = new ArrayList<>();
	static{
		IMAGE_SUFFIX_LIST.add("jpg");
		IMAGE_SUFFIX_LIST.add("jpeg");
		IMAGE_SUFFIX_LIST.add("jfif");
		IMAGE_SUFFIX_LIST.add("tiff");
		IMAGE_SUFFIX_LIST.add("exif");
		IMAGE_SUFFIX_LIST.add("gif");
		IMAGE_SUFFIX_LIST.add("bmp");
		IMAGE_SUFFIX_LIST.add("png");
		IMAGE_SUFFIX_LIST.add("ppm");
		IMAGE_SUFFIX_LIST.add("pgm");
		IMAGE_SUFFIX_LIST.add("pbm");
		IMAGE_SUFFIX_LIST.add("pnm");
		IMAGE_SUFFIX_LIST.add("webp");
		IMAGE_SUFFIX_LIST.add("pcx");
		IMAGE_SUFFIX_LIST.add("tif");
		IMAGE_SUFFIX_LIST.add("tga");
		IMAGE_SUFFIX_LIST.add("fpx");
		IMAGE_SUFFIX_LIST.add("svg");
		IMAGE_SUFFIX_LIST.add("psd");
		IMAGE_SUFFIX_LIST.add("cdr");
		IMAGE_SUFFIX_LIST.add("ai");
	}

	/**
	 * 文档后缀列表(内容来之：https://zh.wikipedia.org/wiki/%E6%96%87%E4%BB%B6%E6%A0%BC%E5%BC%8F%E5%88%97%E8%A1%A8)
	 */
	protected static final List<String> DOCUMENT_SUFFIX_LIST = new ArrayList<>();
	static{
		DOCUMENT_SUFFIX_LIST.add("doc");
		DOCUMENT_SUFFIX_LIST.add("docx");
		DOCUMENT_SUFFIX_LIST.add("txt");
		DOCUMENT_SUFFIX_LIST.add("pdf");
		DOCUMENT_SUFFIX_LIST.add("xml");
		DOCUMENT_SUFFIX_LIST.add("rtf");
		DOCUMENT_SUFFIX_LIST.add("chm");
		DOCUMENT_SUFFIX_LIST.add("tex");
		DOCUMENT_SUFFIX_LIST.add("ltx");
		DOCUMENT_SUFFIX_LIST.add("ppt");
		DOCUMENT_SUFFIX_LIST.add("pptx");
		DOCUMENT_SUFFIX_LIST.add("wps");
		DOCUMENT_SUFFIX_LIST.add("odf");
		DOCUMENT_SUFFIX_LIST.add("mht");
		DOCUMENT_SUFFIX_LIST.add("mhtml");
	}
}
